<?php
    class C_Lesson extends CI_Controller {
        private $data = array();
        function __construct() {
            global $data;
            parent::__construct();
            $this->load->model('_default/M_Home');
            $this->load->model('_default/M_Book');
            $this->load->model('_default/M_Lesson');
            $data['CategoryList'] = $this->M_Book->GetCategoryList();
        }
        function index() {
            
        }
        
        function Review($url) {
            global $data;
            $data['title'] = 'Tổng quan về Môn Học';
            $data['page_type'] = 'Chapters';
            $data['chapter_type'] = 'Review';
            $data['page_type_url'] = $url;
            
            $data['NewFeaure'] = $this->M_Home->GetNewFeature();
                          
            $data['IntroductionPage'] = $this->M_Lesson->GetCategoryIntro($url);
            
            $data['TenBooks'] = $this->M_Book->GetBooks($url);
            
            $this->load->view('_default/_Layout.php', $data);
        }
        function GetListChapter($url) {
            global $data;
            $data['title'] = 'Các bài học liên quan';
            $data['page_type'] = 'Chapters';
            $data['chapter_type'] = 'Lesson';
            $data['page_type_url'] = $url;
            
            
            $data['TenBooks'] = $this->M_Book->GetBooks($url);
            
            $cate_id = $this->M_Book->GetCategoryID($url);
            $data['ChapterListURL'] = $this->M_Lesson->GetChapterListURL($cate_id);
            
            $this->load->view('_default/_Layout.php', $data);
        }
    }
?>
